CAIRO (AP) — The ceasefire between Hamas and Israel will go into effect Sunday at 8:30 a.m. local time (0630 GMT), mediator Qatar announced Saturday, as families of hostages held in Gaza braced for news of loved ones, Palestinians prepared to receive freed detainees and humanitarian groups rushed to set up a surge of aid.

But in a national address 12 hours before the ceasefire was to start, Israeli Prime Minister Benjamin Netanyahu said the country was treating the ceasefire as temporary and retained the right to continue fighting if necessary. He claimed he had the support of U.S. President-elect Donald Trump.

Netanyahu also asserted that he negotiated the best deal possible, even as Israel’s far-right Public Security Minister Itamar Ben-Gvir said he and most of his party would resign from the government in opposition to it.

The prime minister had warned earlier that a ceasefire wouldn’t go forward unless Israel received the names of hostages to be released, as had been agreed. His statement came almost three hours after Israel had expected to receive the names from mediator Qatar. There was no immediate response from Qatar or Hamas.

The overnight approval of the ceasefire deal by Israel's Cabinet, in a rare meeting during the Jewish Sabbath, set off a flurry of activity and a fresh wave of emotions as relatives wondered whether hostages would be returned alive or dead.

The pause in 15 months of war is a step toward ending the deadliest, most destructive fighting ever between Israel and the Hamas militant group — and comes more than a year after the only other ceasefire achieved. The deal was achieved under joint pressure from Trump and the outgoing administration of President Joe Biden ahead of Monday's inauguration.

The first phase of the ceasefire will last 42 days, and negotiations on the far more difficult second phase are meant to begin just over two weeks in. After those six weeks, Israel’s security Cabinet will decide how to proceed.

Israeli airstrikes continued Saturday, and Gaza's Health Ministry said 23 bodies had been brought to hospitals over the past 24 hours.

“What is this truce that kills us hours before it begins?” asked Abdallah Al-Aqad, the brother of a woman killed by an airstrike in the southern city of Khan Younis. Health officials said a couple and their two children, aged 2 and 7, were dead.

And sirens sounded across central and southern Israel, with the military saying it intercepted projectiles launched from Yemen. Iran-backed Houthi rebels there have stepped up attacks in recent weeks, calling it solidarity with Palestinians in Gaza.

Prepping for the ceasefire

In a post on X, Qatar's foreign minister advised Palestinians and others to exercise caution when the ceasefire goes into effect and wait for directions from officials.

Israel's military later said Palestinians will not be able to cross the Netzarim corridor that runs across central Gaza for the first seven days of the ceasefire, and it warned Palestinians not to approach Israeli forces.

People were eagerly waiting to return home.

“The first thing I will do is go and check my house,” said Mohamed Mahdi, a father of two who was displaced from Gaza City's Zaytoun neighborhood. He also looked forward to seeing family in southern Gaza, but is “still concerned that one of us could be martyred before we are able to meet.”

Majida Abu Jarad said she has moved seven times with her husband and their six daughters during the war, heeding Israeli evacuation orders and staying in tents, abandoned classrooms or on the street.

“We will remain in a tent, but the difference is that the bleeding will stop, the fear will stop, and we will sleep reassured,” she said while packing.

Phased in plan

In the ceasefire's first phase, 33 hostages in Gaza are set to be released over six weeks in exchange for 737 Palestinian prisoners held by Israel. Israel’s justice ministry has published a list of the prisoners, all younger or female. An organization that represents victims of Palestinian attacks vowed to petition Israel’s Supreme Court to stop the release.

According to the ceasefire plan approved by Israel's Cabinet, the exchange will begin at 4 p.m. (1400 GMT) Sunday. The plan says three living female hostages will be returned on Day 1, four on Day 7 and the remaining 26 over the following five weeks. During each exchange, Palestinian prisoners will be released by Israel after hostages have arrived safely.

Also to be released are 1,167 Gaza residents who were not involved in the Oct. 7, 2023, Hamas-led attack that sparked the war. All women and children under 19 from Gaza held by Israel will be freed during this phase.

All Palestinian prisoners who were convicted of deadly attacks will be exiled to Gaza or abroad — some for three years and others permanently — and barred from returning to Israel or the West Bank.

The remaining hostages in Gaza, including male soldiers, are to be released in a second phase to be negotiated during the first. Hamas has said it will not release the remaining captives without a lasting ceasefire and a full Israeli withdrawal.

Also during the ceasefire's first phase, Israeli troops are to pull back into a buffer zone about a kilometer (0.6 miles) wide inside Gaza, along its borders with Israel.

That will allow many displaced Palestinians to return to their homes, including in Gaza City and largely isolated and devastated northern Gaza. With most of Gaza's population sheltering in massive, squalid tent camps, Palestinians are desperate to get back to their homes, even though many were destroyed or heavily damaged.

Aid ready to arrive

Gaza should also see a surge in food, medical supplies and other humanitarian aid.

Egypt's foreign minister said the Rafah crossing, Gaza’s main gateway to the outside world, will start operating “soon." The crossing has been closed since Israel's military took over the area last May. The minister said 600 trucks of aid, including 50 fuel trucks, should be entering Gaza daily during the ceasefire.

The ceasefire plan approved by Israel’s Cabinet says all trucks entering Gaza will be subject to Israeli inspections.

“It is clear that the situation in Gaza is still extremely complex and a lot of difficulties still remain for an effective distribution,” U.N. Secretary-General Antonio Guterres said Saturday.

The Hamas-led Oct. 7 attack killed some 1,200 people and left some 250 others captive. Nearly 100 hostages remain in Gaza.

Israel responded with an offensive that has killed more than 46,000 Palestinians, according to local health officials, who do not distinguish between civilians and militants but say women and children make up more than half the dead.

——

Lidman reported from Nahariya, Israel, and Mednick from Jerusalem. Associated Press writer Joe Federman in Jerusalem contributed.

___

Follow AP's war coverage at https://apnews.com/hub/israel-hamas-war

The Mawasi tent camp for displaced Palestinians in Khan Younis, central Gaza Strip, Saturday Jan. 18, 2025.(AP Photo/(AP Photo/Jehad Alshrafi)

Credit: AP

icon to expand image

Credit: AP

Members of the Abu Jarad family, who were displaced by the Israeli bombardment of the Gaza Strip, gather in front of their tent at a camp for displaced Palestinians in the Muwasi area, southern Gaza Strip, Saturday, Jan. 18, 2025. (AP Photo/Abdel Kareem Hana)

Credit: AP

icon to expand image

Credit: AP

Israeli troops are crossing into Israel from the Gaza Strip, Saturday, Jan. 18, 2025. (AP Photo/Tsafrir Abayov)

Credit: AP

icon to expand image

Credit: AP

Israeli soldiers are seen as they return from the Gaza Strip at the Israeli-Gaza border, Saturday, Jan. 18, 2025. (AP Photo/Tsafrir Abayov)

Credit: AP

icon to expand image

Credit: AP

Israeli troops are crossing into Israel from the Gaza Strip, Saturday, Jan. 18, 2025. (AP Photo/Tsafrir Abayov)

Credit: AP

icon to expand image

Credit: AP

Israeli soldiers wave to the camera from an APC as they cross from the Gaza Strip into Israel, Saturday, Jan. 18, 2025. (AP Photo/Tsafrir Abayov)

Credit: AP

icon to expand image

Credit: AP

Israeli soldiers carry combat equipment as they return from the Gaza Strip at the Israeli-Gaza border, Saturday, Jan. 18, 2025. (AP Photo/Tsafrir Abayov)

Credit: AP

icon to expand image

Credit: AP

A little girl touches a mural showing female Israeli soldiers taken hostage during the Oct. 7, 2023 Hamas-led attack on Israel in Tel Aviv, Israel, Saturday Jan. 18, 2025.(AP Photo/Oded Balilty)

Credit: AP

icon to expand image

Credit: AP

Palestinians build a tent at the Mawasi camp in Khan Younis, central Gaza Strip, Saturday Jan. 18, 2025.(AP Photo/(AP Photo/Jehad Alshrafi)

Credit: AP

icon to expand image

Credit: AP

The sun sets above the Mawasi tent camp for displaced Palestinians in Khan Younis, central Gaza Strip, Saturday Jan. 18, 2025.(AP Photo/(AP Photo/Jehad Alshrafi)

Credit: AP

icon to expand image

Credit: AP

Palestinians walk along a central street at dusk in Khan Younis, central Gaza Strip, Saturday Jan. 18, 2025.(AP Photo/(AP Photo/Jehad Alshrafi)

Credit: AP

icon to expand image

Credit: AP

Palestinians walk along a street market in Khan Younis, central Gaza Strip, Saturday Jan. 18, 2025.(AP Photo/(AP Photo/Jehad Alshrafi)

Credit: AP

icon to expand image

Credit: AP